import request from '@/utils/request'

// 查询待办列表
export function listFlow(query) {
  return request({
    url: '/conference/flow/list',
    method: 'get',
    params: query
  })
}

export function getIds(query) {
  return request({
    url: '/conference/flow/getAllRecordIds',
    method: 'get',
    params: query
  })
}
export function getStatisticRecord(query) {
  return request({
    url: '/common/getStatisticRecord',
    method: 'get',
    params: query
  })
}


// 查询待办详细
export function getFlow(id) {
  return request({
    url: '/conference/flow/' + id,
    method: 'get'
  })
}

export function getToDoNum() {
  return request({
    url: '/conference/flow/getToDoNum',
    method: 'get'
  })
}

export function closeRecord(id) {
  return request({
    url: '/conference/flow/cancelRecord/' +id,
    method: 'get'
  })
}
export function updateProblemLevel(data) {
  return request({
    url: '/conference/flow/updateProblemLevel',
    method: 'post',
    data: data
  })
}
export function rejectRecord(data) {
  return request({
    url: '/conference/flow/rejectRecord',
    method: 'post',
    data: data
  })
}




// 新增待办
export function addFlow(data) {
  return request({
    url: '/conference/flow',
    method: 'post',
    data: data
  })
}

// 修改待办
export function updateFlow(data) {
  return request({
    url: '/conference/flow',
    method: 'put',
    data: data
  })
}

export function updateRecord(data) {
  return request({
    url: '/conference/flow/updateRecord',
    method: 'post',
    data: data
  })
}
// 删除待办
export function delFlow(id) {
  return request({
    url: '/conference/flow/' + id,
    method: 'delete'
  })
}
